import { defineStore } from "pinia";

export const useMeanStore = defineStore("mean", {
  state: () => ({
    menuList: [],
    permList: [],
    hasRoute: false,
    isCollapse: false,
  }),
  actions: {
    changeRouteStatus(state) {
      this.hasRoute = state;
      sessionStorage.setItem("hasRoute", state);
    },
    setMenuList(menus) {
      this.menuList = menus;
    },
    setPermList(authoritys) {
      this.permList = authoritys;
    },
    setIsCollapse(val) {
      this.isCollapse = val;
    },
  },
});
